home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11898 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Deleting lines from text files.
  5. Date: Wed, 27 Mar 96 12:30:15 GMT
  6. Organization: none
  7. Message-ID: <827929815snz@genesis.demon.co.uk>
  8. References: <4j749k$qs9@eiger.pncl.co.uk>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4j749k$qs9@eiger.pncl.co.uk>
  15.            henrya@pncl.co.uk "Henry Audley-Charles" writes:
  16.  
  17. >My text file contains numbers in the range 01 to 49 ie lottery style.
  18. >Each set of six numbers occupies a line of text in the .dat file.  I
  19. >can add new lines at the end but can't delete lines.
  20.  
  21. Was there supposed to be a question there?
  22.  
  23. > Also, what is
  24. >the difference between fprintf (" ...... ");    & fwrite (stream, "
  25. >..   ") etc.  I have tried both but seem to end up with the wrong
  26. >bits being removed.
  27.  
  28. Post code. The difference between fprintf and fwrite is that the former
  29. writes text style output controlled by a format string while the latter
  30. writes binary style data corresponding to the internal representation of
  31. an object.
  32.  
  33. > I think its somthing to do with fseek or rewind.
  34.  
  35. No, both write characters starting at the current file position and moving
  36. it on appropriately.
  37.  
  38. -- 
  39. -----------------------------------------
  40. Lawrence Kirby | fred@genesis.demon.co.uk
  41. Wilts, England | 70734.126@compuserve.com
  42. -----------------------------------------
  43.